
/**
 * This is a generated class and is not intended for modification.  
 */
package com.model.valueObjects
{
import com.adobe.fiber.styles.IStyle;
import com.adobe.fiber.styles.Style;
import com.adobe.fiber.styles.StyleValidator;
import com.adobe.fiber.valueobjects.AbstractEntityMetadata;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import mx.events.ValidationResultEvent;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IModelType;
import mx.events.PropertyChangeEvent;

use namespace model_internal;

[ExcludeClass]
internal class _VoInvoiceEntityMetadata extends com.adobe.fiber.valueobjects.AbstractEntityMetadata
{
    private static var emptyArray:Array = new Array();

    model_internal static var allProperties:Array = new Array("pro_name", "total_qty", "cre_userid_fk", "part_number", "invoice_date", "detserialnumber", "serialnumber", "invoice_discount", "invoice_code", "pro_description", "discount_type", "pro_qty", "activestatus", "currency_serialnumber_fk", "current_rate", "default_price", "client_name", "total_amount", "cre_datetime", "price_per_unit", "invoice_gst", "pro_total_price", "invoice_term", "invoice_remarks", "base_currency_detserialnumber_fk", "pro_serialnumber_fk", "do_detserialnumber_fk", "pro_discount", "delivery_order_code", "pro_detserialnumber", "customer_serialnumber_fk", "invoice_serialnumber_fk", "price_list");
    model_internal static var allAssociationProperties:Array = new Array();
    model_internal static var allRequiredProperties:Array = new Array("pro_name", "total_qty", "cre_userid_fk", "part_number", "invoice_date", "detserialnumber", "serialnumber", "invoice_discount", "invoice_code", "pro_description", "discount_type", "pro_qty", "activestatus", "currency_serialnumber_fk", "current_rate", "default_price", "client_name", "total_amount", "cre_datetime", "price_per_unit", "invoice_gst", "pro_total_price", "invoice_term", "invoice_remarks", "base_currency_detserialnumber_fk", "pro_serialnumber_fk", "do_detserialnumber_fk", "pro_discount", "delivery_order_code", "pro_detserialnumber", "customer_serialnumber_fk", "invoice_serialnumber_fk", "price_list");
    model_internal static var allAlwaysAvailableProperties:Array = new Array("pro_name", "total_qty", "cre_userid_fk", "part_number", "invoice_date", "detserialnumber", "serialnumber", "invoice_discount", "invoice_code", "pro_description", "discount_type", "pro_qty", "activestatus", "currency_serialnumber_fk", "current_rate", "default_price", "client_name", "total_amount", "cre_datetime", "price_per_unit", "invoice_gst", "pro_total_price", "invoice_term", "invoice_remarks", "base_currency_detserialnumber_fk", "pro_serialnumber_fk", "do_detserialnumber_fk", "pro_discount", "delivery_order_code", "pro_detserialnumber", "customer_serialnumber_fk", "invoice_serialnumber_fk", "price_list");
    model_internal static var guardedProperties:Array = new Array();
    model_internal static var dataProperties:Array = new Array("pro_name", "total_qty", "cre_userid_fk", "part_number", "invoice_date", "detserialnumber", "serialnumber", "invoice_discount", "invoice_code", "pro_description", "discount_type", "pro_qty", "activestatus", "currency_serialnumber_fk", "current_rate", "default_price", "client_name", "total_amount", "cre_datetime", "price_per_unit", "invoice_gst", "pro_total_price", "invoice_term", "invoice_remarks", "base_currency_detserialnumber_fk", "pro_serialnumber_fk", "do_detserialnumber_fk", "pro_discount", "delivery_order_code", "pro_detserialnumber", "customer_serialnumber_fk", "invoice_serialnumber_fk", "price_list");
    model_internal static var derivedProperties:Array = new Array();
    model_internal static var collectionProperties:Array = new Array("pro_name", "part_number", "detserialnumber", "pro_description", "pro_qty", "default_price", "price_per_unit", "pro_total_price", "base_currency_detserialnumber_fk", "pro_serialnumber_fk", "do_detserialnumber_fk", "pro_discount", "delivery_order_code", "pro_detserialnumber", "invoice_serialnumber_fk", "price_list");
    model_internal static var collectionBaseMap:Object;
    model_internal static var entityName:String = "VoInvoice";
    model_internal static var dependentsOnMap:Object;
    model_internal static var dependedOnServices:Array = new Array();

    
    model_internal var _pro_nameIsValid:Boolean;
    model_internal var _pro_nameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _pro_nameIsValidCacheInitialized:Boolean = false;
    model_internal var _pro_nameValidationFailureMessages:Array;
    
    model_internal var _part_numberIsValid:Boolean;
    model_internal var _part_numberValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _part_numberIsValidCacheInitialized:Boolean = false;
    model_internal var _part_numberValidationFailureMessages:Array;
    
    model_internal var _invoice_dateIsValid:Boolean;
    model_internal var _invoice_dateValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _invoice_dateIsValidCacheInitialized:Boolean = false;
    model_internal var _invoice_dateValidationFailureMessages:Array;
    
    model_internal var _detserialnumberIsValid:Boolean;
    model_internal var _detserialnumberValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _detserialnumberIsValidCacheInitialized:Boolean = false;
    model_internal var _detserialnumberValidationFailureMessages:Array;
    
    model_internal var _invoice_codeIsValid:Boolean;
    model_internal var _invoice_codeValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _invoice_codeIsValidCacheInitialized:Boolean = false;
    model_internal var _invoice_codeValidationFailureMessages:Array;
    
    model_internal var _pro_descriptionIsValid:Boolean;
    model_internal var _pro_descriptionValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _pro_descriptionIsValidCacheInitialized:Boolean = false;
    model_internal var _pro_descriptionValidationFailureMessages:Array;
    
    model_internal var _pro_qtyIsValid:Boolean;
    model_internal var _pro_qtyValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _pro_qtyIsValidCacheInitialized:Boolean = false;
    model_internal var _pro_qtyValidationFailureMessages:Array;
    
    model_internal var _default_priceIsValid:Boolean;
    model_internal var _default_priceValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _default_priceIsValidCacheInitialized:Boolean = false;
    model_internal var _default_priceValidationFailureMessages:Array;
    
    model_internal var _client_nameIsValid:Boolean;
    model_internal var _client_nameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _client_nameIsValidCacheInitialized:Boolean = false;
    model_internal var _client_nameValidationFailureMessages:Array;
    
    model_internal var _cre_datetimeIsValid:Boolean;
    model_internal var _cre_datetimeValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _cre_datetimeIsValidCacheInitialized:Boolean = false;
    model_internal var _cre_datetimeValidationFailureMessages:Array;
    
    model_internal var _price_per_unitIsValid:Boolean;
    model_internal var _price_per_unitValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _price_per_unitIsValidCacheInitialized:Boolean = false;
    model_internal var _price_per_unitValidationFailureMessages:Array;
    
    model_internal var _pro_total_priceIsValid:Boolean;
    model_internal var _pro_total_priceValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _pro_total_priceIsValidCacheInitialized:Boolean = false;
    model_internal var _pro_total_priceValidationFailureMessages:Array;
    
    model_internal var _invoice_remarksIsValid:Boolean;
    model_internal var _invoice_remarksValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _invoice_remarksIsValidCacheInitialized:Boolean = false;
    model_internal var _invoice_remarksValidationFailureMessages:Array;
    
    model_internal var _base_currency_detserialnumber_fkIsValid:Boolean;
    model_internal var _base_currency_detserialnumber_fkValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _base_currency_detserialnumber_fkIsValidCacheInitialized:Boolean = false;
    model_internal var _base_currency_detserialnumber_fkValidationFailureMessages:Array;
    
    model_internal var _pro_serialnumber_fkIsValid:Boolean;
    model_internal var _pro_serialnumber_fkValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _pro_serialnumber_fkIsValidCacheInitialized:Boolean = false;
    model_internal var _pro_serialnumber_fkValidationFailureMessages:Array;
    
    model_internal var _do_detserialnumber_fkIsValid:Boolean;
    model_internal var _do_detserialnumber_fkValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _do_detserialnumber_fkIsValidCacheInitialized:Boolean = false;
    model_internal var _do_detserialnumber_fkValidationFailureMessages:Array;
    
    model_internal var _pro_discountIsValid:Boolean;
    model_internal var _pro_discountValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _pro_discountIsValidCacheInitialized:Boolean = false;
    model_internal var _pro_discountValidationFailureMessages:Array;
    
    model_internal var _delivery_order_codeIsValid:Boolean;
    model_internal var _delivery_order_codeValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _delivery_order_codeIsValidCacheInitialized:Boolean = false;
    model_internal var _delivery_order_codeValidationFailureMessages:Array;
    
    model_internal var _pro_detserialnumberIsValid:Boolean;
    model_internal var _pro_detserialnumberValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _pro_detserialnumberIsValidCacheInitialized:Boolean = false;
    model_internal var _pro_detserialnumberValidationFailureMessages:Array;
    
    model_internal var _invoice_serialnumber_fkIsValid:Boolean;
    model_internal var _invoice_serialnumber_fkValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _invoice_serialnumber_fkIsValidCacheInitialized:Boolean = false;
    model_internal var _invoice_serialnumber_fkValidationFailureMessages:Array;
    
    model_internal var _price_listIsValid:Boolean;
    model_internal var _price_listValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _price_listIsValidCacheInitialized:Boolean = false;
    model_internal var _price_listValidationFailureMessages:Array;

    model_internal var _instance:_Super_VoInvoice;
    model_internal static var _nullStyle:com.adobe.fiber.styles.Style = new com.adobe.fiber.styles.Style();

    public function _VoInvoiceEntityMetadata(value : _Super_VoInvoice)
    {
        // initialize property maps
        if (model_internal::dependentsOnMap == null)
        {
            // depenents map
            model_internal::dependentsOnMap = new Object();
            model_internal::dependentsOnMap["pro_name"] = new Array();
            model_internal::dependentsOnMap["total_qty"] = new Array();
            model_internal::dependentsOnMap["cre_userid_fk"] = new Array();
            model_internal::dependentsOnMap["part_number"] = new Array();
            model_internal::dependentsOnMap["invoice_date"] = new Array();
            model_internal::dependentsOnMap["detserialnumber"] = new Array();
            model_internal::dependentsOnMap["serialnumber"] = new Array();
            model_internal::dependentsOnMap["invoice_discount"] = new Array();
            model_internal::dependentsOnMap["invoice_code"] = new Array();
            model_internal::dependentsOnMap["pro_description"] = new Array();
            model_internal::dependentsOnMap["discount_type"] = new Array();
            model_internal::dependentsOnMap["pro_qty"] = new Array();
            model_internal::dependentsOnMap["activestatus"] = new Array();
            model_internal::dependentsOnMap["currency_serialnumber_fk"] = new Array();
            model_internal::dependentsOnMap["current_rate"] = new Array();
            model_internal::dependentsOnMap["default_price"] = new Array();
            model_internal::dependentsOnMap["client_name"] = new Array();
            model_internal::dependentsOnMap["total_amount"] = new Array();
            model_internal::dependentsOnMap["cre_datetime"] = new Array();
            model_internal::dependentsOnMap["price_per_unit"] = new Array();
            model_internal::dependentsOnMap["invoice_gst"] = new Array();
            model_internal::dependentsOnMap["pro_total_price"] = new Array();
            model_internal::dependentsOnMap["invoice_term"] = new Array();
            model_internal::dependentsOnMap["invoice_remarks"] = new Array();
            model_internal::dependentsOnMap["base_currency_detserialnumber_fk"] = new Array();
            model_internal::dependentsOnMap["pro_serialnumber_fk"] = new Array();
            model_internal::dependentsOnMap["do_detserialnumber_fk"] = new Array();
            model_internal::dependentsOnMap["pro_discount"] = new Array();
            model_internal::dependentsOnMap["delivery_order_code"] = new Array();
            model_internal::dependentsOnMap["pro_detserialnumber"] = new Array();
            model_internal::dependentsOnMap["customer_serialnumber_fk"] = new Array();
            model_internal::dependentsOnMap["invoice_serialnumber_fk"] = new Array();
            model_internal::dependentsOnMap["price_list"] = new Array();

            // collection base map
            model_internal::collectionBaseMap = new Object()
            model_internal::collectionBaseMap["pro_name"] = "String";
            model_internal::collectionBaseMap["part_number"] = "String";
            model_internal::collectionBaseMap["detserialnumber"] = "int";
            model_internal::collectionBaseMap["pro_description"] = "String";
            model_internal::collectionBaseMap["pro_qty"] = "int";
            model_internal::collectionBaseMap["default_price"] = "String";
            model_internal::collectionBaseMap["price_per_unit"] = "Number";
            model_internal::collectionBaseMap["pro_total_price"] = "Number";
            model_internal::collectionBaseMap["base_currency_detserialnumber_fk"] = "int";
            model_internal::collectionBaseMap["pro_serialnumber_fk"] = "int";
            model_internal::collectionBaseMap["do_detserialnumber_fk"] = "int";
            model_internal::collectionBaseMap["pro_discount"] = "Number";
            model_internal::collectionBaseMap["delivery_order_code"] = "String";
            model_internal::collectionBaseMap["pro_detserialnumber"] = "int";
            model_internal::collectionBaseMap["invoice_serialnumber_fk"] = "int";
            model_internal::collectionBaseMap["price_list"] = "Object";
        }

        model_internal::_instance = value;
        model_internal::_pro_nameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPro_name);
        model_internal::_pro_nameValidator.required = true;
        model_internal::_pro_nameValidator.requiredFieldError = "pro_name is required";
        //model_internal::_pro_nameValidator.source = model_internal::_instance;
        //model_internal::_pro_nameValidator.property = "pro_name";
        model_internal::_part_numberValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPart_number);
        model_internal::_part_numberValidator.required = true;
        model_internal::_part_numberValidator.requiredFieldError = "part_number is required";
        //model_internal::_part_numberValidator.source = model_internal::_instance;
        //model_internal::_part_numberValidator.property = "part_number";
        model_internal::_invoice_dateValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForInvoice_date);
        model_internal::_invoice_dateValidator.required = true;
        model_internal::_invoice_dateValidator.requiredFieldError = "invoice_date is required";
        //model_internal::_invoice_dateValidator.source = model_internal::_instance;
        //model_internal::_invoice_dateValidator.property = "invoice_date";
        model_internal::_detserialnumberValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForDetserialnumber);
        model_internal::_detserialnumberValidator.required = true;
        model_internal::_detserialnumberValidator.requiredFieldError = "detserialnumber is required";
        //model_internal::_detserialnumberValidator.source = model_internal::_instance;
        //model_internal::_detserialnumberValidator.property = "detserialnumber";
        model_internal::_invoice_codeValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForInvoice_code);
        model_internal::_invoice_codeValidator.required = true;
        model_internal::_invoice_codeValidator.requiredFieldError = "invoice_code is required";
        //model_internal::_invoice_codeValidator.source = model_internal::_instance;
        //model_internal::_invoice_codeValidator.property = "invoice_code";
        model_internal::_pro_descriptionValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPro_description);
        model_internal::_pro_descriptionValidator.required = true;
        model_internal::_pro_descriptionValidator.requiredFieldError = "pro_description is required";
        //model_internal::_pro_descriptionValidator.source = model_internal::_instance;
        //model_internal::_pro_descriptionValidator.property = "pro_description";
        model_internal::_pro_qtyValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPro_qty);
        model_internal::_pro_qtyValidator.required = true;
        model_internal::_pro_qtyValidator.requiredFieldError = "pro_qty is required";
        //model_internal::_pro_qtyValidator.source = model_internal::_instance;
        //model_internal::_pro_qtyValidator.property = "pro_qty";
        model_internal::_default_priceValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForDefault_price);
        model_internal::_default_priceValidator.required = true;
        model_internal::_default_priceValidator.requiredFieldError = "default_price is required";
        //model_internal::_default_priceValidator.source = model_internal::_instance;
        //model_internal::_default_priceValidator.property = "default_price";
        model_internal::_client_nameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForClient_name);
        model_internal::_client_nameValidator.required = true;
        model_internal::_client_nameValidator.requiredFieldError = "client_name is required";
        //model_internal::_client_nameValidator.source = model_internal::_instance;
        //model_internal::_client_nameValidator.property = "client_name";
        model_internal::_cre_datetimeValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForCre_datetime);
        model_internal::_cre_datetimeValidator.required = true;
        model_internal::_cre_datetimeValidator.requiredFieldError = "cre_datetime is required";
        //model_internal::_cre_datetimeValidator.source = model_internal::_instance;
        //model_internal::_cre_datetimeValidator.property = "cre_datetime";
        model_internal::_price_per_unitValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPrice_per_unit);
        model_internal::_price_per_unitValidator.required = true;
        model_internal::_price_per_unitValidator.requiredFieldError = "price_per_unit is required";
        //model_internal::_price_per_unitValidator.source = model_internal::_instance;
        //model_internal::_price_per_unitValidator.property = "price_per_unit";
        model_internal::_pro_total_priceValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPro_total_price);
        model_internal::_pro_total_priceValidator.required = true;
        model_internal::_pro_total_priceValidator.requiredFieldError = "pro_total_price is required";
        //model_internal::_pro_total_priceValidator.source = model_internal::_instance;
        //model_internal::_pro_total_priceValidator.property = "pro_total_price";
        model_internal::_invoice_remarksValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForInvoice_remarks);
        model_internal::_invoice_remarksValidator.required = true;
        model_internal::_invoice_remarksValidator.requiredFieldError = "invoice_remarks is required";
        //model_internal::_invoice_remarksValidator.source = model_internal::_instance;
        //model_internal::_invoice_remarksValidator.property = "invoice_remarks";
        model_internal::_base_currency_detserialnumber_fkValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForBase_currency_detserialnumber_fk);
        model_internal::_base_currency_detserialnumber_fkValidator.required = true;
        model_internal::_base_currency_detserialnumber_fkValidator.requiredFieldError = "base_currency_detserialnumber_fk is required";
        //model_internal::_base_currency_detserialnumber_fkValidator.source = model_internal::_instance;
        //model_internal::_base_currency_detserialnumber_fkValidator.property = "base_currency_detserialnumber_fk";
        model_internal::_pro_serialnumber_fkValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPro_serialnumber_fk);
        model_internal::_pro_serialnumber_fkValidator.required = true;
        model_internal::_pro_serialnumber_fkValidator.requiredFieldError = "pro_serialnumber_fk is required";
        //model_internal::_pro_serialnumber_fkValidator.source = model_internal::_instance;
        //model_internal::_pro_serialnumber_fkValidator.property = "pro_serialnumber_fk";
        model_internal::_do_detserialnumber_fkValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForDo_detserialnumber_fk);
        model_internal::_do_detserialnumber_fkValidator.required = true;
        model_internal::_do_detserialnumber_fkValidator.requiredFieldError = "do_detserialnumber_fk is required";
        //model_internal::_do_detserialnumber_fkValidator.source = model_internal::_instance;
        //model_internal::_do_detserialnumber_fkValidator.property = "do_detserialnumber_fk";
        model_internal::_pro_discountValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPro_discount);
        model_internal::_pro_discountValidator.required = true;
        model_internal::_pro_discountValidator.requiredFieldError = "pro_discount is required";
        //model_internal::_pro_discountValidator.source = model_internal::_instance;
        //model_internal::_pro_discountValidator.property = "pro_discount";
        model_internal::_delivery_order_codeValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForDelivery_order_code);
        model_internal::_delivery_order_codeValidator.required = true;
        model_internal::_delivery_order_codeValidator.requiredFieldError = "delivery_order_code is required";
        //model_internal::_delivery_order_codeValidator.source = model_internal::_instance;
        //model_internal::_delivery_order_codeValidator.property = "delivery_order_code";
        model_internal::_pro_detserialnumberValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPro_detserialnumber);
        model_internal::_pro_detserialnumberValidator.required = true;
        model_internal::_pro_detserialnumberValidator.requiredFieldError = "pro_detserialnumber is required";
        //model_internal::_pro_detserialnumberValidator.source = model_internal::_instance;
        //model_internal::_pro_detserialnumberValidator.property = "pro_detserialnumber";
        model_internal::_invoice_serialnumber_fkValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForInvoice_serialnumber_fk);
        model_internal::_invoice_serialnumber_fkValidator.required = true;
        model_internal::_invoice_serialnumber_fkValidator.requiredFieldError = "invoice_serialnumber_fk is required";
        //model_internal::_invoice_serialnumber_fkValidator.source = model_internal::_instance;
        //model_internal::_invoice_serialnumber_fkValidator.property = "invoice_serialnumber_fk";
        model_internal::_price_listValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPrice_list);
        model_internal::_price_listValidator.required = true;
        model_internal::_price_listValidator.requiredFieldError = "price_list is required";
        //model_internal::_price_listValidator.source = model_internal::_instance;
        //model_internal::_price_listValidator.property = "price_list";
    }

    override public function getEntityName():String
    {
        return model_internal::entityName;
    }

    override public function getProperties():Array
    {
        return model_internal::allProperties;
    }

    override public function getAssociationProperties():Array
    {
        return model_internal::allAssociationProperties;
    }

    override public function getRequiredProperties():Array
    {
         return model_internal::allRequiredProperties;   
    }

    override public function getDataProperties():Array
    {
        return model_internal::dataProperties;
    }

    override public function getGuardedProperties():Array
    {
        return model_internal::guardedProperties;
    }

    override public function getUnguardedProperties():Array
    {
        return model_internal::allAlwaysAvailableProperties;
    }

    override public function getDependants(propertyName:String):Array
    {
       if (model_internal::dataProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a data property of entity VoInvoice");  
            
       return model_internal::dependentsOnMap[propertyName] as Array;  
    }

    override public function getDependedOnServices():Array
    {
        return model_internal::dependedOnServices;
    }

    override public function getCollectionProperties():Array
    {
        return model_internal::collectionProperties;
    }

    override public function getCollectionBase(propertyName:String):String
    {
        if (model_internal::collectionProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a collection property of entity VoInvoice");  

        return model_internal::collectionBaseMap[propertyName];
    }

    override public function getAvailableProperties():com.adobe.fiber.valueobjects.IPropertyIterator
    {
        return new com.adobe.fiber.valueobjects.AvailablePropertyIterator(this);
    }

    override public function getValue(propertyName:String):*
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity VoInvoice");
        }

        return model_internal::_instance[propertyName];
    }

    override public function setValue(propertyName:String, value:*):void
    {
        if (model_internal::dataProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " is not a data property of entity VoInvoice");
        }

        model_internal::_instance[propertyName] = value;
    }

    override public function getMappedByProperty(associationProperty:String):String
    {
        switch(associationProperty)
        {
            default:
            {
                return null;
            }
        }
    }

    override public function getPropertyLength(propertyName:String):int
    {
        switch(propertyName)
        {
            default:
            {
                return 0;
            }
        }
    }

    override public function isAvailable(propertyName:String):Boolean
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity VoInvoice");
        }

        if (model_internal::allAlwaysAvailableProperties.indexOf(propertyName) != -1)
        {
            return true;
        }

        switch(propertyName)
        {
            default:
            {
                return true;
            }
        }
    }

    override public function getIdentityMap():Object
    {
        var returnMap:Object = new Object();

        return returnMap;
    }

    [Bindable(event="propertyChange")]
    override public function get invalidConstraints():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_invalidConstraints;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_invalidConstraints;        
        }
    }

    [Bindable(event="propertyChange")]
    override public function get validationFailureMessages():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
    }

    override public function getDependantInvalidConstraints(propertyName:String):Array
    {
        var dependants:Array = getDependants(propertyName);
        if (dependants.length == 0)
        {
            return emptyArray;
        }

        var currentlyInvalid:Array = invalidConstraints;
        if (currentlyInvalid.length == 0)
        {
            return emptyArray;
        }

        var filterFunc:Function = function(element:*, index:int, arr:Array):Boolean
        {
            return dependants.indexOf(element) > -1;
        }

        return currentlyInvalid.filter(filterFunc);
    }

    /**
     * isValid
     */
    [Bindable(event="propertyChange")] 
    public function get isValid() : Boolean
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_isValid;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_isValid;
        }
    }

    [Bindable(event="propertyChange")]
    public function get isPro_nameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isTotal_qtyAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCre_userid_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPart_numberAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isInvoice_dateAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDetserialnumberAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isSerialnumberAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isInvoice_discountAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isInvoice_codeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPro_descriptionAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDiscount_typeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPro_qtyAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isActivestatusAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCurrency_serialnumber_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCurrent_rateAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDefault_priceAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isClient_nameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isTotal_amountAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCre_datetimeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPrice_per_unitAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isInvoice_gstAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPro_total_priceAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isInvoice_termAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isInvoice_remarksAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isBase_currency_detserialnumber_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPro_serialnumber_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDo_detserialnumber_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPro_discountAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDelivery_order_codeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPro_detserialnumberAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCustomer_serialnumber_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isInvoice_serialnumber_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPrice_listAvailable():Boolean
    {
        return true;
    }


    /**
     * derived property recalculation
     */
    public function invalidateDependentOnPro_name():void
    {
        if (model_internal::_pro_nameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPro_name = null;
            model_internal::calculatePro_nameIsValid();
        }
    }
    public function invalidateDependentOnPart_number():void
    {
        if (model_internal::_part_numberIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPart_number = null;
            model_internal::calculatePart_numberIsValid();
        }
    }
    public function invalidateDependentOnInvoice_date():void
    {
        if (model_internal::_invoice_dateIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfInvoice_date = null;
            model_internal::calculateInvoice_dateIsValid();
        }
    }
    public function invalidateDependentOnDetserialnumber():void
    {
        if (model_internal::_detserialnumberIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfDetserialnumber = null;
            model_internal::calculateDetserialnumberIsValid();
        }
    }
    public function invalidateDependentOnInvoice_code():void
    {
        if (model_internal::_invoice_codeIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfInvoice_code = null;
            model_internal::calculateInvoice_codeIsValid();
        }
    }
    public function invalidateDependentOnPro_description():void
    {
        if (model_internal::_pro_descriptionIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPro_description = null;
            model_internal::calculatePro_descriptionIsValid();
        }
    }
    public function invalidateDependentOnPro_qty():void
    {
        if (model_internal::_pro_qtyIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPro_qty = null;
            model_internal::calculatePro_qtyIsValid();
        }
    }
    public function invalidateDependentOnDefault_price():void
    {
        if (model_internal::_default_priceIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfDefault_price = null;
            model_internal::calculateDefault_priceIsValid();
        }
    }
    public function invalidateDependentOnClient_name():void
    {
        if (model_internal::_client_nameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfClient_name = null;
            model_internal::calculateClient_nameIsValid();
        }
    }
    public function invalidateDependentOnCre_datetime():void
    {
        if (model_internal::_cre_datetimeIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfCre_datetime = null;
            model_internal::calculateCre_datetimeIsValid();
        }
    }
    public function invalidateDependentOnPrice_per_unit():void
    {
        if (model_internal::_price_per_unitIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPrice_per_unit = null;
            model_internal::calculatePrice_per_unitIsValid();
        }
    }
    public function invalidateDependentOnPro_total_price():void
    {
        if (model_internal::_pro_total_priceIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPro_total_price = null;
            model_internal::calculatePro_total_priceIsValid();
        }
    }
    public function invalidateDependentOnInvoice_remarks():void
    {
        if (model_internal::_invoice_remarksIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfInvoice_remarks = null;
            model_internal::calculateInvoice_remarksIsValid();
        }
    }
    public function invalidateDependentOnBase_currency_detserialnumber_fk():void
    {
        if (model_internal::_base_currency_detserialnumber_fkIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfBase_currency_detserialnumber_fk = null;
            model_internal::calculateBase_currency_detserialnumber_fkIsValid();
        }
    }
    public function invalidateDependentOnPro_serialnumber_fk():void
    {
        if (model_internal::_pro_serialnumber_fkIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPro_serialnumber_fk = null;
            model_internal::calculatePro_serialnumber_fkIsValid();
        }
    }
    public function invalidateDependentOnDo_detserialnumber_fk():void
    {
        if (model_internal::_do_detserialnumber_fkIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfDo_detserialnumber_fk = null;
            model_internal::calculateDo_detserialnumber_fkIsValid();
        }
    }
    public function invalidateDependentOnPro_discount():void
    {
        if (model_internal::_pro_discountIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPro_discount = null;
            model_internal::calculatePro_discountIsValid();
        }
    }
    public function invalidateDependentOnDelivery_order_code():void
    {
        if (model_internal::_delivery_order_codeIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfDelivery_order_code = null;
            model_internal::calculateDelivery_order_codeIsValid();
        }
    }
    public function invalidateDependentOnPro_detserialnumber():void
    {
        if (model_internal::_pro_detserialnumberIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPro_detserialnumber = null;
            model_internal::calculatePro_detserialnumberIsValid();
        }
    }
    public function invalidateDependentOnInvoice_serialnumber_fk():void
    {
        if (model_internal::_invoice_serialnumber_fkIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfInvoice_serialnumber_fk = null;
            model_internal::calculateInvoice_serialnumber_fkIsValid();
        }
    }
    public function invalidateDependentOnPrice_list():void
    {
        if (model_internal::_price_listIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPrice_list = null;
            model_internal::calculatePrice_listIsValid();
        }
    }

    model_internal function fireChangeEvent(propertyName:String, oldValue:Object, newValue:Object):void
    {
        this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, propertyName, oldValue, newValue));
    }

    [Bindable(event="propertyChange")]   
    public function get pro_nameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get pro_nameValidator() : StyleValidator
    {
        return model_internal::_pro_nameValidator;
    }

    model_internal function set _pro_nameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_pro_nameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_pro_nameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_nameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get pro_nameIsValid():Boolean
    {
        if (!model_internal::_pro_nameIsValidCacheInitialized)
        {
            model_internal::calculatePro_nameIsValid();
        }

        return model_internal::_pro_nameIsValid;
    }

    model_internal function calculatePro_nameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_pro_nameValidator.validate(model_internal::_instance.pro_name)
        model_internal::_pro_nameIsValid_der = (valRes.results == null);
        model_internal::_pro_nameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::pro_nameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::pro_nameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get pro_nameValidationFailureMessages():Array
    {
        if (model_internal::_pro_nameValidationFailureMessages == null)
            model_internal::calculatePro_nameIsValid();

        return _pro_nameValidationFailureMessages;
    }

    model_internal function set pro_nameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_pro_nameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_pro_nameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_nameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get total_qtyStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get cre_userid_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get part_numberStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get part_numberValidator() : StyleValidator
    {
        return model_internal::_part_numberValidator;
    }

    model_internal function set _part_numberIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_part_numberIsValid;         
        if (oldValue !== value)
        {
            model_internal::_part_numberIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "part_numberIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get part_numberIsValid():Boolean
    {
        if (!model_internal::_part_numberIsValidCacheInitialized)
        {
            model_internal::calculatePart_numberIsValid();
        }

        return model_internal::_part_numberIsValid;
    }

    model_internal function calculatePart_numberIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_part_numberValidator.validate(model_internal::_instance.part_number)
        model_internal::_part_numberIsValid_der = (valRes.results == null);
        model_internal::_part_numberIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::part_numberValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::part_numberValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get part_numberValidationFailureMessages():Array
    {
        if (model_internal::_part_numberValidationFailureMessages == null)
            model_internal::calculatePart_numberIsValid();

        return _part_numberValidationFailureMessages;
    }

    model_internal function set part_numberValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_part_numberValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_part_numberValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "part_numberValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get invoice_dateStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get invoice_dateValidator() : StyleValidator
    {
        return model_internal::_invoice_dateValidator;
    }

    model_internal function set _invoice_dateIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_invoice_dateIsValid;         
        if (oldValue !== value)
        {
            model_internal::_invoice_dateIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "invoice_dateIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get invoice_dateIsValid():Boolean
    {
        if (!model_internal::_invoice_dateIsValidCacheInitialized)
        {
            model_internal::calculateInvoice_dateIsValid();
        }

        return model_internal::_invoice_dateIsValid;
    }

    model_internal function calculateInvoice_dateIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_invoice_dateValidator.validate(model_internal::_instance.invoice_date)
        model_internal::_invoice_dateIsValid_der = (valRes.results == null);
        model_internal::_invoice_dateIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::invoice_dateValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::invoice_dateValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get invoice_dateValidationFailureMessages():Array
    {
        if (model_internal::_invoice_dateValidationFailureMessages == null)
            model_internal::calculateInvoice_dateIsValid();

        return _invoice_dateValidationFailureMessages;
    }

    model_internal function set invoice_dateValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_invoice_dateValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_invoice_dateValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "invoice_dateValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get detserialnumberStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get detserialnumberValidator() : StyleValidator
    {
        return model_internal::_detserialnumberValidator;
    }

    model_internal function set _detserialnumberIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_detserialnumberIsValid;         
        if (oldValue !== value)
        {
            model_internal::_detserialnumberIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "detserialnumberIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get detserialnumberIsValid():Boolean
    {
        if (!model_internal::_detserialnumberIsValidCacheInitialized)
        {
            model_internal::calculateDetserialnumberIsValid();
        }

        return model_internal::_detserialnumberIsValid;
    }

    model_internal function calculateDetserialnumberIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_detserialnumberValidator.validate(model_internal::_instance.detserialnumber)
        model_internal::_detserialnumberIsValid_der = (valRes.results == null);
        model_internal::_detserialnumberIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::detserialnumberValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::detserialnumberValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get detserialnumberValidationFailureMessages():Array
    {
        if (model_internal::_detserialnumberValidationFailureMessages == null)
            model_internal::calculateDetserialnumberIsValid();

        return _detserialnumberValidationFailureMessages;
    }

    model_internal function set detserialnumberValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_detserialnumberValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_detserialnumberValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "detserialnumberValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get serialnumberStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get invoice_discountStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get invoice_codeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get invoice_codeValidator() : StyleValidator
    {
        return model_internal::_invoice_codeValidator;
    }

    model_internal function set _invoice_codeIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_invoice_codeIsValid;         
        if (oldValue !== value)
        {
            model_internal::_invoice_codeIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "invoice_codeIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get invoice_codeIsValid():Boolean
    {
        if (!model_internal::_invoice_codeIsValidCacheInitialized)
        {
            model_internal::calculateInvoice_codeIsValid();
        }

        return model_internal::_invoice_codeIsValid;
    }

    model_internal function calculateInvoice_codeIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_invoice_codeValidator.validate(model_internal::_instance.invoice_code)
        model_internal::_invoice_codeIsValid_der = (valRes.results == null);
        model_internal::_invoice_codeIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::invoice_codeValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::invoice_codeValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get invoice_codeValidationFailureMessages():Array
    {
        if (model_internal::_invoice_codeValidationFailureMessages == null)
            model_internal::calculateInvoice_codeIsValid();

        return _invoice_codeValidationFailureMessages;
    }

    model_internal function set invoice_codeValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_invoice_codeValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_invoice_codeValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "invoice_codeValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get pro_descriptionStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get pro_descriptionValidator() : StyleValidator
    {
        return model_internal::_pro_descriptionValidator;
    }

    model_internal function set _pro_descriptionIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_pro_descriptionIsValid;         
        if (oldValue !== value)
        {
            model_internal::_pro_descriptionIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_descriptionIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get pro_descriptionIsValid():Boolean
    {
        if (!model_internal::_pro_descriptionIsValidCacheInitialized)
        {
            model_internal::calculatePro_descriptionIsValid();
        }

        return model_internal::_pro_descriptionIsValid;
    }

    model_internal function calculatePro_descriptionIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_pro_descriptionValidator.validate(model_internal::_instance.pro_description)
        model_internal::_pro_descriptionIsValid_der = (valRes.results == null);
        model_internal::_pro_descriptionIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::pro_descriptionValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::pro_descriptionValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get pro_descriptionValidationFailureMessages():Array
    {
        if (model_internal::_pro_descriptionValidationFailureMessages == null)
            model_internal::calculatePro_descriptionIsValid();

        return _pro_descriptionValidationFailureMessages;
    }

    model_internal function set pro_descriptionValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_pro_descriptionValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_pro_descriptionValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_descriptionValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get discount_typeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get pro_qtyStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get pro_qtyValidator() : StyleValidator
    {
        return model_internal::_pro_qtyValidator;
    }

    model_internal function set _pro_qtyIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_pro_qtyIsValid;         
        if (oldValue !== value)
        {
            model_internal::_pro_qtyIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_qtyIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get pro_qtyIsValid():Boolean
    {
        if (!model_internal::_pro_qtyIsValidCacheInitialized)
        {
            model_internal::calculatePro_qtyIsValid();
        }

        return model_internal::_pro_qtyIsValid;
    }

    model_internal function calculatePro_qtyIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_pro_qtyValidator.validate(model_internal::_instance.pro_qty)
        model_internal::_pro_qtyIsValid_der = (valRes.results == null);
        model_internal::_pro_qtyIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::pro_qtyValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::pro_qtyValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get pro_qtyValidationFailureMessages():Array
    {
        if (model_internal::_pro_qtyValidationFailureMessages == null)
            model_internal::calculatePro_qtyIsValid();

        return _pro_qtyValidationFailureMessages;
    }

    model_internal function set pro_qtyValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_pro_qtyValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_pro_qtyValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_qtyValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get activestatusStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get currency_serialnumber_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get current_rateStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get default_priceStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get default_priceValidator() : StyleValidator
    {
        return model_internal::_default_priceValidator;
    }

    model_internal function set _default_priceIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_default_priceIsValid;         
        if (oldValue !== value)
        {
            model_internal::_default_priceIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "default_priceIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get default_priceIsValid():Boolean
    {
        if (!model_internal::_default_priceIsValidCacheInitialized)
        {
            model_internal::calculateDefault_priceIsValid();
        }

        return model_internal::_default_priceIsValid;
    }

    model_internal function calculateDefault_priceIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_default_priceValidator.validate(model_internal::_instance.default_price)
        model_internal::_default_priceIsValid_der = (valRes.results == null);
        model_internal::_default_priceIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::default_priceValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::default_priceValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get default_priceValidationFailureMessages():Array
    {
        if (model_internal::_default_priceValidationFailureMessages == null)
            model_internal::calculateDefault_priceIsValid();

        return _default_priceValidationFailureMessages;
    }

    model_internal function set default_priceValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_default_priceValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_default_priceValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "default_priceValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get client_nameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get client_nameValidator() : StyleValidator
    {
        return model_internal::_client_nameValidator;
    }

    model_internal function set _client_nameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_client_nameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_client_nameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "client_nameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get client_nameIsValid():Boolean
    {
        if (!model_internal::_client_nameIsValidCacheInitialized)
        {
            model_internal::calculateClient_nameIsValid();
        }

        return model_internal::_client_nameIsValid;
    }

    model_internal function calculateClient_nameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_client_nameValidator.validate(model_internal::_instance.client_name)
        model_internal::_client_nameIsValid_der = (valRes.results == null);
        model_internal::_client_nameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::client_nameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::client_nameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get client_nameValidationFailureMessages():Array
    {
        if (model_internal::_client_nameValidationFailureMessages == null)
            model_internal::calculateClient_nameIsValid();

        return _client_nameValidationFailureMessages;
    }

    model_internal function set client_nameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_client_nameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_client_nameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "client_nameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get total_amountStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get cre_datetimeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get cre_datetimeValidator() : StyleValidator
    {
        return model_internal::_cre_datetimeValidator;
    }

    model_internal function set _cre_datetimeIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_cre_datetimeIsValid;         
        if (oldValue !== value)
        {
            model_internal::_cre_datetimeIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cre_datetimeIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get cre_datetimeIsValid():Boolean
    {
        if (!model_internal::_cre_datetimeIsValidCacheInitialized)
        {
            model_internal::calculateCre_datetimeIsValid();
        }

        return model_internal::_cre_datetimeIsValid;
    }

    model_internal function calculateCre_datetimeIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_cre_datetimeValidator.validate(model_internal::_instance.cre_datetime)
        model_internal::_cre_datetimeIsValid_der = (valRes.results == null);
        model_internal::_cre_datetimeIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::cre_datetimeValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::cre_datetimeValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get cre_datetimeValidationFailureMessages():Array
    {
        if (model_internal::_cre_datetimeValidationFailureMessages == null)
            model_internal::calculateCre_datetimeIsValid();

        return _cre_datetimeValidationFailureMessages;
    }

    model_internal function set cre_datetimeValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_cre_datetimeValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_cre_datetimeValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cre_datetimeValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get price_per_unitStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get price_per_unitValidator() : StyleValidator
    {
        return model_internal::_price_per_unitValidator;
    }

    model_internal function set _price_per_unitIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_price_per_unitIsValid;         
        if (oldValue !== value)
        {
            model_internal::_price_per_unitIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "price_per_unitIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get price_per_unitIsValid():Boolean
    {
        if (!model_internal::_price_per_unitIsValidCacheInitialized)
        {
            model_internal::calculatePrice_per_unitIsValid();
        }

        return model_internal::_price_per_unitIsValid;
    }

    model_internal function calculatePrice_per_unitIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_price_per_unitValidator.validate(model_internal::_instance.price_per_unit)
        model_internal::_price_per_unitIsValid_der = (valRes.results == null);
        model_internal::_price_per_unitIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::price_per_unitValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::price_per_unitValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get price_per_unitValidationFailureMessages():Array
    {
        if (model_internal::_price_per_unitValidationFailureMessages == null)
            model_internal::calculatePrice_per_unitIsValid();

        return _price_per_unitValidationFailureMessages;
    }

    model_internal function set price_per_unitValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_price_per_unitValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_price_per_unitValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "price_per_unitValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get invoice_gstStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get pro_total_priceStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get pro_total_priceValidator() : StyleValidator
    {
        return model_internal::_pro_total_priceValidator;
    }

    model_internal function set _pro_total_priceIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_pro_total_priceIsValid;         
        if (oldValue !== value)
        {
            model_internal::_pro_total_priceIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_total_priceIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get pro_total_priceIsValid():Boolean
    {
        if (!model_internal::_pro_total_priceIsValidCacheInitialized)
        {
            model_internal::calculatePro_total_priceIsValid();
        }

        return model_internal::_pro_total_priceIsValid;
    }

    model_internal function calculatePro_total_priceIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_pro_total_priceValidator.validate(model_internal::_instance.pro_total_price)
        model_internal::_pro_total_priceIsValid_der = (valRes.results == null);
        model_internal::_pro_total_priceIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::pro_total_priceValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::pro_total_priceValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get pro_total_priceValidationFailureMessages():Array
    {
        if (model_internal::_pro_total_priceValidationFailureMessages == null)
            model_internal::calculatePro_total_priceIsValid();

        return _pro_total_priceValidationFailureMessages;
    }

    model_internal function set pro_total_priceValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_pro_total_priceValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_pro_total_priceValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_total_priceValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get invoice_termStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get invoice_remarksStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get invoice_remarksValidator() : StyleValidator
    {
        return model_internal::_invoice_remarksValidator;
    }

    model_internal function set _invoice_remarksIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_invoice_remarksIsValid;         
        if (oldValue !== value)
        {
            model_internal::_invoice_remarksIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "invoice_remarksIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get invoice_remarksIsValid():Boolean
    {
        if (!model_internal::_invoice_remarksIsValidCacheInitialized)
        {
            model_internal::calculateInvoice_remarksIsValid();
        }

        return model_internal::_invoice_remarksIsValid;
    }

    model_internal function calculateInvoice_remarksIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_invoice_remarksValidator.validate(model_internal::_instance.invoice_remarks)
        model_internal::_invoice_remarksIsValid_der = (valRes.results == null);
        model_internal::_invoice_remarksIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::invoice_remarksValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::invoice_remarksValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get invoice_remarksValidationFailureMessages():Array
    {
        if (model_internal::_invoice_remarksValidationFailureMessages == null)
            model_internal::calculateInvoice_remarksIsValid();

        return _invoice_remarksValidationFailureMessages;
    }

    model_internal function set invoice_remarksValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_invoice_remarksValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_invoice_remarksValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "invoice_remarksValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get base_currency_detserialnumber_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get base_currency_detserialnumber_fkValidator() : StyleValidator
    {
        return model_internal::_base_currency_detserialnumber_fkValidator;
    }

    model_internal function set _base_currency_detserialnumber_fkIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_base_currency_detserialnumber_fkIsValid;         
        if (oldValue !== value)
        {
            model_internal::_base_currency_detserialnumber_fkIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "base_currency_detserialnumber_fkIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get base_currency_detserialnumber_fkIsValid():Boolean
    {
        if (!model_internal::_base_currency_detserialnumber_fkIsValidCacheInitialized)
        {
            model_internal::calculateBase_currency_detserialnumber_fkIsValid();
        }

        return model_internal::_base_currency_detserialnumber_fkIsValid;
    }

    model_internal function calculateBase_currency_detserialnumber_fkIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_base_currency_detserialnumber_fkValidator.validate(model_internal::_instance.base_currency_detserialnumber_fk)
        model_internal::_base_currency_detserialnumber_fkIsValid_der = (valRes.results == null);
        model_internal::_base_currency_detserialnumber_fkIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::base_currency_detserialnumber_fkValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::base_currency_detserialnumber_fkValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get base_currency_detserialnumber_fkValidationFailureMessages():Array
    {
        if (model_internal::_base_currency_detserialnumber_fkValidationFailureMessages == null)
            model_internal::calculateBase_currency_detserialnumber_fkIsValid();

        return _base_currency_detserialnumber_fkValidationFailureMessages;
    }

    model_internal function set base_currency_detserialnumber_fkValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_base_currency_detserialnumber_fkValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_base_currency_detserialnumber_fkValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "base_currency_detserialnumber_fkValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get pro_serialnumber_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get pro_serialnumber_fkValidator() : StyleValidator
    {
        return model_internal::_pro_serialnumber_fkValidator;
    }

    model_internal function set _pro_serialnumber_fkIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_pro_serialnumber_fkIsValid;         
        if (oldValue !== value)
        {
            model_internal::_pro_serialnumber_fkIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_serialnumber_fkIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get pro_serialnumber_fkIsValid():Boolean
    {
        if (!model_internal::_pro_serialnumber_fkIsValidCacheInitialized)
        {
            model_internal::calculatePro_serialnumber_fkIsValid();
        }

        return model_internal::_pro_serialnumber_fkIsValid;
    }

    model_internal function calculatePro_serialnumber_fkIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_pro_serialnumber_fkValidator.validate(model_internal::_instance.pro_serialnumber_fk)
        model_internal::_pro_serialnumber_fkIsValid_der = (valRes.results == null);
        model_internal::_pro_serialnumber_fkIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::pro_serialnumber_fkValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::pro_serialnumber_fkValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get pro_serialnumber_fkValidationFailureMessages():Array
    {
        if (model_internal::_pro_serialnumber_fkValidationFailureMessages == null)
            model_internal::calculatePro_serialnumber_fkIsValid();

        return _pro_serialnumber_fkValidationFailureMessages;
    }

    model_internal function set pro_serialnumber_fkValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_pro_serialnumber_fkValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_pro_serialnumber_fkValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_serialnumber_fkValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get do_detserialnumber_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get do_detserialnumber_fkValidator() : StyleValidator
    {
        return model_internal::_do_detserialnumber_fkValidator;
    }

    model_internal function set _do_detserialnumber_fkIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_do_detserialnumber_fkIsValid;         
        if (oldValue !== value)
        {
            model_internal::_do_detserialnumber_fkIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "do_detserialnumber_fkIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get do_detserialnumber_fkIsValid():Boolean
    {
        if (!model_internal::_do_detserialnumber_fkIsValidCacheInitialized)
        {
            model_internal::calculateDo_detserialnumber_fkIsValid();
        }

        return model_internal::_do_detserialnumber_fkIsValid;
    }

    model_internal function calculateDo_detserialnumber_fkIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_do_detserialnumber_fkValidator.validate(model_internal::_instance.do_detserialnumber_fk)
        model_internal::_do_detserialnumber_fkIsValid_der = (valRes.results == null);
        model_internal::_do_detserialnumber_fkIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::do_detserialnumber_fkValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::do_detserialnumber_fkValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get do_detserialnumber_fkValidationFailureMessages():Array
    {
        if (model_internal::_do_detserialnumber_fkValidationFailureMessages == null)
            model_internal::calculateDo_detserialnumber_fkIsValid();

        return _do_detserialnumber_fkValidationFailureMessages;
    }

    model_internal function set do_detserialnumber_fkValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_do_detserialnumber_fkValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_do_detserialnumber_fkValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "do_detserialnumber_fkValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get pro_discountStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get pro_discountValidator() : StyleValidator
    {
        return model_internal::_pro_discountValidator;
    }

    model_internal function set _pro_discountIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_pro_discountIsValid;         
        if (oldValue !== value)
        {
            model_internal::_pro_discountIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_discountIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get pro_discountIsValid():Boolean
    {
        if (!model_internal::_pro_discountIsValidCacheInitialized)
        {
            model_internal::calculatePro_discountIsValid();
        }

        return model_internal::_pro_discountIsValid;
    }

    model_internal function calculatePro_discountIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_pro_discountValidator.validate(model_internal::_instance.pro_discount)
        model_internal::_pro_discountIsValid_der = (valRes.results == null);
        model_internal::_pro_discountIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::pro_discountValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::pro_discountValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get pro_discountValidationFailureMessages():Array
    {
        if (model_internal::_pro_discountValidationFailureMessages == null)
            model_internal::calculatePro_discountIsValid();

        return _pro_discountValidationFailureMessages;
    }

    model_internal function set pro_discountValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_pro_discountValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_pro_discountValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_discountValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get delivery_order_codeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get delivery_order_codeValidator() : StyleValidator
    {
        return model_internal::_delivery_order_codeValidator;
    }

    model_internal function set _delivery_order_codeIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_delivery_order_codeIsValid;         
        if (oldValue !== value)
        {
            model_internal::_delivery_order_codeIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "delivery_order_codeIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get delivery_order_codeIsValid():Boolean
    {
        if (!model_internal::_delivery_order_codeIsValidCacheInitialized)
        {
            model_internal::calculateDelivery_order_codeIsValid();
        }

        return model_internal::_delivery_order_codeIsValid;
    }

    model_internal function calculateDelivery_order_codeIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_delivery_order_codeValidator.validate(model_internal::_instance.delivery_order_code)
        model_internal::_delivery_order_codeIsValid_der = (valRes.results == null);
        model_internal::_delivery_order_codeIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::delivery_order_codeValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::delivery_order_codeValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get delivery_order_codeValidationFailureMessages():Array
    {
        if (model_internal::_delivery_order_codeValidationFailureMessages == null)
            model_internal::calculateDelivery_order_codeIsValid();

        return _delivery_order_codeValidationFailureMessages;
    }

    model_internal function set delivery_order_codeValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_delivery_order_codeValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_delivery_order_codeValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "delivery_order_codeValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get pro_detserialnumberStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get pro_detserialnumberValidator() : StyleValidator
    {
        return model_internal::_pro_detserialnumberValidator;
    }

    model_internal function set _pro_detserialnumberIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_pro_detserialnumberIsValid;         
        if (oldValue !== value)
        {
            model_internal::_pro_detserialnumberIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_detserialnumberIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get pro_detserialnumberIsValid():Boolean
    {
        if (!model_internal::_pro_detserialnumberIsValidCacheInitialized)
        {
            model_internal::calculatePro_detserialnumberIsValid();
        }

        return model_internal::_pro_detserialnumberIsValid;
    }

    model_internal function calculatePro_detserialnumberIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_pro_detserialnumberValidator.validate(model_internal::_instance.pro_detserialnumber)
        model_internal::_pro_detserialnumberIsValid_der = (valRes.results == null);
        model_internal::_pro_detserialnumberIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::pro_detserialnumberValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::pro_detserialnumberValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get pro_detserialnumberValidationFailureMessages():Array
    {
        if (model_internal::_pro_detserialnumberValidationFailureMessages == null)
            model_internal::calculatePro_detserialnumberIsValid();

        return _pro_detserialnumberValidationFailureMessages;
    }

    model_internal function set pro_detserialnumberValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_pro_detserialnumberValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_pro_detserialnumberValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_detserialnumberValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get customer_serialnumber_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get invoice_serialnumber_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get invoice_serialnumber_fkValidator() : StyleValidator
    {
        return model_internal::_invoice_serialnumber_fkValidator;
    }

    model_internal function set _invoice_serialnumber_fkIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_invoice_serialnumber_fkIsValid;         
        if (oldValue !== value)
        {
            model_internal::_invoice_serialnumber_fkIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "invoice_serialnumber_fkIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get invoice_serialnumber_fkIsValid():Boolean
    {
        if (!model_internal::_invoice_serialnumber_fkIsValidCacheInitialized)
        {
            model_internal::calculateInvoice_serialnumber_fkIsValid();
        }

        return model_internal::_invoice_serialnumber_fkIsValid;
    }

    model_internal function calculateInvoice_serialnumber_fkIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_invoice_serialnumber_fkValidator.validate(model_internal::_instance.invoice_serialnumber_fk)
        model_internal::_invoice_serialnumber_fkIsValid_der = (valRes.results == null);
        model_internal::_invoice_serialnumber_fkIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::invoice_serialnumber_fkValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::invoice_serialnumber_fkValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get invoice_serialnumber_fkValidationFailureMessages():Array
    {
        if (model_internal::_invoice_serialnumber_fkValidationFailureMessages == null)
            model_internal::calculateInvoice_serialnumber_fkIsValid();

        return _invoice_serialnumber_fkValidationFailureMessages;
    }

    model_internal function set invoice_serialnumber_fkValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_invoice_serialnumber_fkValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_invoice_serialnumber_fkValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "invoice_serialnumber_fkValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get price_listStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get price_listValidator() : StyleValidator
    {
        return model_internal::_price_listValidator;
    }

    model_internal function set _price_listIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_price_listIsValid;         
        if (oldValue !== value)
        {
            model_internal::_price_listIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "price_listIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get price_listIsValid():Boolean
    {
        if (!model_internal::_price_listIsValidCacheInitialized)
        {
            model_internal::calculatePrice_listIsValid();
        }

        return model_internal::_price_listIsValid;
    }

    model_internal function calculatePrice_listIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_price_listValidator.validate(model_internal::_instance.price_list)
        model_internal::_price_listIsValid_der = (valRes.results == null);
        model_internal::_price_listIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::price_listValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::price_listValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get price_listValidationFailureMessages():Array
    {
        if (model_internal::_price_listValidationFailureMessages == null)
            model_internal::calculatePrice_listIsValid();

        return _price_listValidationFailureMessages;
    }

    model_internal function set price_listValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_price_listValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_price_listValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "price_listValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }


     /**
     * 
     * @inheritDoc 
     */ 
     override public function getStyle(propertyName:String):com.adobe.fiber.styles.IStyle
     {
         switch(propertyName)
         {
            default:
            {
                return null;
            }
         }
     }
     
     /**
     * 
     * @inheritDoc 
     *  
     */  
     override public function getPropertyValidationFailureMessages(propertyName:String):Array
     {
         switch(propertyName)
         {
            case("pro_name"):
            {
                return pro_nameValidationFailureMessages;
            }
            case("part_number"):
            {
                return part_numberValidationFailureMessages;
            }
            case("invoice_date"):
            {
                return invoice_dateValidationFailureMessages;
            }
            case("detserialnumber"):
            {
                return detserialnumberValidationFailureMessages;
            }
            case("invoice_code"):
            {
                return invoice_codeValidationFailureMessages;
            }
            case("pro_description"):
            {
                return pro_descriptionValidationFailureMessages;
            }
            case("pro_qty"):
            {
                return pro_qtyValidationFailureMessages;
            }
            case("default_price"):
            {
                return default_priceValidationFailureMessages;
            }
            case("client_name"):
            {
                return client_nameValidationFailureMessages;
            }
            case("cre_datetime"):
            {
                return cre_datetimeValidationFailureMessages;
            }
            case("price_per_unit"):
            {
                return price_per_unitValidationFailureMessages;
            }
            case("pro_total_price"):
            {
                return pro_total_priceValidationFailureMessages;
            }
            case("invoice_remarks"):
            {
                return invoice_remarksValidationFailureMessages;
            }
            case("base_currency_detserialnumber_fk"):
            {
                return base_currency_detserialnumber_fkValidationFailureMessages;
            }
            case("pro_serialnumber_fk"):
            {
                return pro_serialnumber_fkValidationFailureMessages;
            }
            case("do_detserialnumber_fk"):
            {
                return do_detserialnumber_fkValidationFailureMessages;
            }
            case("pro_discount"):
            {
                return pro_discountValidationFailureMessages;
            }
            case("delivery_order_code"):
            {
                return delivery_order_codeValidationFailureMessages;
            }
            case("pro_detserialnumber"):
            {
                return pro_detserialnumberValidationFailureMessages;
            }
            case("invoice_serialnumber_fk"):
            {
                return invoice_serialnumber_fkValidationFailureMessages;
            }
            case("price_list"):
            {
                return price_listValidationFailureMessages;
            }
            default:
            {
                return emptyArray;
            }
         }
     }

}

}
